package com.atguigu;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Configuration;

/**
 * @Author：Fu ChenYu
 * @Date：2024/3/8 15:36
 * @Description：Knife4jConfig
 */
@Configuration
public class Knife4jConfig {

    public GroupedOpenApi adminApi() {
        return GroupedOpenApi.builder().group("admin-api").pathsToMatch("/admin/**").build();
    }

    /***
     * @description 自定义接口信息
     */
    public OpenAPI customOpenAPI(){
        return new OpenAPI().
                info(new Info().title("尚品甄选API接口文档").
                        version("1.0.0").description("尚品甄选API接口文档").
                        contact(new Contact().name("尚品甄选")));
    }
}
